package com.isoft.demo01.bean;

public class BaseController {
    public ResponseData getResponseData(boolean result){
        ResponseData responseData=new ResponseData();
        if (result){
            responseData.setErrorCode(ResultCode.SUCCESS.getCode());
            responseData.setMsg(ResultCode.SUCCESS.getMessage());
        }else {
            responseData.setErrorCode(ResultCode.COMMON_FAIL.getCode());
            responseData.setMsg(ResultCode.COMMON_FAIL.getMessage());

        }
        responseData.setData(result);
        return responseData;
    }
}
